/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package it.unitn.science.matr155863_148346_145963.bccstore.items;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @author berto
 */
public class Commission implements Serializable{
    
    public static final String[] FIELDS={
                        "_id_commission",
                        "buyer",
                        "seller",
                        "product",
                        "quantity",
                        "price",
                        "bill"};
    
    public static final int ID=0;
    public static final int BUYER=1;
    public static final int SELLER=2;
    public static final int PRODUCT=3;
    public static final int QUANTITY=4;
    public static final int PRICE=5;
    public static final int BILL=6;
    
    private Integer id;
    private Integer buyerId;
    private Integer sellerId;
    private String buyerFirstName;
    private String buyerLastName;
    private String buyerUserName;
    private String sellerFirstName;
    private String sellerLastName;
    private String sellerUserName;
    private Integer productId;
    private Product product;
    private Integer quantity;
    private Float price;
    private Integer umId;
    private String umName;
    private String bill;
    private Date date;    
    
    public Commission(){
    
    }

    public Commission(Integer id, 
            Integer buyerId, Integer sellerId, 
            String buyerFirstName, String buyerLastName,String buyerUserName, 
            String sellerFirstName, String sellerLastName,String selleUserName, 
            Integer productId, Product product, 
            Integer quantity, Float price,
            Integer umId, String umName,
            String bill,Long date) {
        this.id = id;
        this.buyerId = buyerId;
        this.sellerId = sellerId;
        this.buyerFirstName=sellerFirstName;
        this.buyerLastName=buyerLastName;
        this.buyerUserName = buyerUserName;
        this.sellerFirstName=sellerFirstName;
        this.sellerLastName=sellerLastName;
        this.sellerUserName=selleUserName;
        this.productId = productId;
        this.product = product;
        this.quantity = quantity;
        this.price = price;
        this.umId=umId;
        this.umName=umName;
        this.bill = bill;
        this.umName=umName;
        this.date=new Date(date);
    }
    
    public String getSellerUserName() {
        return sellerUserName;
    }

    public void setSellerUserName(String sellerUserName) {
        this.sellerUserName = sellerUserName;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Integer getUmId() {
        return umId;
    }

    public void setUmId(Integer umId) {
        this.umId = umId;
    }

    public String getUmName() {
        return umName;
    }

    public void setUmName(String umName) {
        this.umName = umName;
    }
    
    

    public String getSellerFirstName() {
        return sellerFirstName;
    }

    public void setSellerFirstName(String sellerFirstName) {
        this.sellerFirstName = sellerFirstName;
    }

    public String getSellerLastName() {
        return sellerLastName;
    }

    public void setSellerLastName(String sellerLastName) {
        this.sellerLastName = sellerLastName;
    }
    
 

    public String getBill() {
        return bill;
    }

    public void setBill(String bill) {
        this.bill = bill;
    }

    public Integer getBuyerId() {
        return buyerId;
    }

    public void setBuyerId(Integer buyerId) {
        this.buyerId = buyerId;
    }

    public String getBuyerFirstName() {
        return buyerFirstName;
    }

    public void setBuyerFirstName(String buyerFirstName) {
        this.buyerFirstName = buyerFirstName;
    }

    public String getBuyerLastName() {
        return buyerLastName;
    }

    public void setBuyerLastName(String buyerLastName) {
        this.buyerLastName = buyerLastName;
    }

    public String getBuyerUserName() {
        return buyerUserName;
    }

    public void setBuyerUserName(String buyerUserName) {
        this.buyerUserName = buyerUserName;
    }

    

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Float getPrice() {
        return price;
    }

    public void setPrice(Float price) {
        this.price = price;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Integer getSellerId() {
        return sellerId;
    }

    public void setSellerId(Integer sellerId) {
        this.sellerId = sellerId;
    }

    
    
    
    
}
